from appium.webdriver.common.appiumby import AppiumBy
from AppTest.page.base_page import BasePage


class ApprovalPage(BasePage):

    __BUTTON_AGGREE = (AppiumBy.XPATH, "//*[@text='同意']")

    def approval_apply(self, aname):
        by = (AppiumBy.XPATH, f"//*[@text='{aname}']")
        self.do_click(by)

    def aggree(self):
        self.do_click(self.__BUTTON_AGGREE)



